﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NTmdb.Fakes;

namespace NTmdb.TestProject
{
    /// <summary>
    ///     This is a test class for TmdbMovieMethodExtensionsTest and is intended
    ///     to contain all TmdbMovieMethodExtensionsTest Unit Tests
    /// </summary>
    [TestClass]
    public class TmdbMovieMethodExtensionsTest
    {
        /// <summary>
        ///     A test for ToTmdbParameter
        /// </summary>
        [TestMethod]
        public void ToTmdbParameterTest()
        {
            IApiConfiguration apiConfiguration = new StubIApiConfiguration();
            apiConfiguration.AppendToMovieMethodAlternativeTitles = Guid.NewGuid().ToString();
            apiConfiguration.AppendToMovieMethodCasts = Guid.NewGuid().ToString();
            apiConfiguration.AppendToMovieMethodImages = Guid.NewGuid().ToString();
            apiConfiguration.AppendToMovieMethodKeywords = Guid.NewGuid().ToString();
            apiConfiguration.AppendToMovieMethodReleases = Guid.NewGuid().ToString();
            apiConfiguration.AppendToMovieMethodTrailers = Guid.NewGuid().ToString();
            apiConfiguration.AppendToMovieMethodTranslations = Guid.NewGuid().ToString();
            apiConfiguration.AppendToMovieMethodSimilarMovies = Guid.NewGuid().ToString();
            apiConfiguration.AppendToMovieMethodReviews = Guid.NewGuid().ToString();
            apiConfiguration.AppendToMovieMethodLists = Guid.NewGuid().ToString();
            apiConfiguration.AppendToMovieMethodChanges = Guid.NewGuid().ToString();

            Assert.AreEqual( apiConfiguration.AppendToMovieMethodAlternativeTitles,
                             TmdbMovieMethod.AlternativeTitles.ToTmdbParameter( apiConfiguration ) );

            Assert.AreEqual( apiConfiguration.AppendToMovieMethodCasts,
                             TmdbMovieMethod.Casts.ToTmdbParameter( apiConfiguration ) );
            Assert.AreEqual( apiConfiguration.AppendToMovieMethodImages,
                             TmdbMovieMethod.Images.ToTmdbParameter( apiConfiguration ) );
            Assert.AreEqual( apiConfiguration.AppendToMovieMethodKeywords,
                             TmdbMovieMethod.Keywords.ToTmdbParameter( apiConfiguration ) );
            Assert.AreEqual( apiConfiguration.AppendToMovieMethodReleases,
                             TmdbMovieMethod.Releases.ToTmdbParameter( apiConfiguration ) );

            Assert.AreEqual( apiConfiguration.AppendToMovieMethodTrailers,
                             TmdbMovieMethod.Trailers.ToTmdbParameter( apiConfiguration ) );

            Assert.AreEqual( apiConfiguration.AppendToMovieMethodTranslations,
                             TmdbMovieMethod.Translations.ToTmdbParameter( apiConfiguration ) );

            Assert.AreEqual( apiConfiguration.AppendToMovieMethodSimilarMovies,
                             TmdbMovieMethod.SimilarMovies.ToTmdbParameter( apiConfiguration ) );

            Assert.AreEqual( apiConfiguration.AppendToMovieMethodReviews,
                             TmdbMovieMethod.Reviews.ToTmdbParameter( apiConfiguration ) );

            Assert.AreEqual( apiConfiguration.AppendToMovieMethodLists,
                             TmdbMovieMethod.Lists.ToTmdbParameter( apiConfiguration ) );

            Assert.AreEqual( apiConfiguration.AppendToMovieMethodChanges,
                             TmdbMovieMethod.Changes.ToTmdbParameter( apiConfiguration ) );
        }
    }
}